package org.bite.logsex.controller;

import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;

@Controller
@Slf4j
public class LogController {
//    private static Logger logger = LoggerFactory.getLogger(LogController.class);
    @PostConstruct
    public void printLog(){
        System.out.println("打印日志");
        /*logger.info("打印日志");
        logger.error("this is error");
        logger.warn("this is warning");
        logger.info("this is info");

        logger.debug("this is debug");
        logger.trace("this is trace");*/
        log.info("打印日志");
        log.error("this is error");
        log.warn("this is warning");
        log.info("this is info");

        log.debug("this is debug");
        log.trace("this is trace");
    }
}
